<?php

namespace JLPay\Models\Openmerch\Query;

/**
 * 渠道信息
 */
class ChannelInfo
{
    protected string $channelId = '';  // 渠道ID
    protected string $reportStatus = '';  // 报备状态 (对应Java的reportedFlag)
    protected string $channelMerchNo = '';  // 渠道商户号
    protected string $failReason = '';  // 失败原因
    protected string $channelMerchName = '';  // 渠道商户名称
    protected string $channelMerchShortname = '';  // 渠道商户经营名称 (对应Java的channelBusinessName)
    protected string $reportTime = '';  // 报备时间 (对应Java的reportedTime)
    protected string $channelOrgId = '';  // 渠道服务商编号
    protected string $feeType = '';  // 费率类型 (对应Java的rateType)

    /**
     * 设置渠道ID
     *
     * @param string $channelId
     * @return self
     */
    public function setChannelId(string $channelId): self
    {
        $this->channelId = $channelId;
        return $this;
    }

    /**
     * 设置报备状态
     *
     * @param string $reportStatus
     * @return self
     */
    public function setReportStatus(string $reportStatus): self
    {
        $this->reportStatus = $reportStatus;
        return $this;
    }

    /**
     * 设置渠道商户号
     *
     * @param string $channelMerchNo
     * @return self
     */
    public function setChannelMerchNo(string $channelMerchNo): self
    {
        $this->channelMerchNo = $channelMerchNo;
        return $this;
    }

    /**
     * 设置失败原因
     *
     * @param string $failReason
     * @return self
     */
    public function setFailReason(string $failReason): self
    {
        $this->failReason = $failReason;
        return $this;
    }

    /**
     * 设置渠道商户名称
     *
     * @param string $channelMerchName
     * @return self
     */
    public function setChannelMerchName(string $channelMerchName): self
    {
        $this->channelMerchName = $channelMerchName;
        return $this;
    }

    /**
     * 设置渠道商户经营名称
     *
     * @param string $channelMerchShortname
     * @return self
     */
    public function setChannelMerchShortname(string $channelMerchShortname): self
    {
        $this->channelMerchShortname = $channelMerchShortname;
        return $this;
    }

    /**
     * 设置报备时间
     *
     * @param string $reportTime
     * @return self
     */
    public function setReportTime(string $reportTime): self
    {
        $this->reportTime = $reportTime;
        return $this;
    }

    /**
     * 设置渠道服务商编号
     *
     * @param string $channelOrgId
     * @return self
     */
    public function setChannelOrgId(string $channelOrgId): self
    {
        $this->channelOrgId = $channelOrgId;
        return $this;
    }

    /**
     * 设置费率类型
     *
     * @param string $feeType
     * @return self
     */
    public function setFeeType(string $feeType): self
    {
        $this->feeType = $feeType;
        return $this;
    }

    /**
     * 获取渠道ID
     *
     * @return string
     */
    public function getChannelId(): string
    {
        return $this->channelId;
    }

    /**
     * 获取报备状态
     *
     * @return string
     */
    public function getReportStatus(): string
    {
        return $this->reportStatus;
    }

    /**
     * 获取渠道商户号
     *
     * @return string
     */
    public function getChannelMerchNo(): string
    {
        return $this->channelMerchNo;
    }

    /**
     * 获取失败原因
     *
     * @return string
     */
    public function getFailReason(): string
    {
        return $this->failReason;
    }

    /**
     * 获取渠道商户名称
     *
     * @return string
     */
    public function getChannelMerchName(): string
    {
        return $this->channelMerchName;
    }

    /**
     * 获取渠道商户经营名称
     *
     * @return string
     */
    public function getChannelMerchShortname(): string
    {
        return $this->channelMerchShortname;
    }

    /**
     * 获取报备时间
     *
     * @return string
     */
    public function getReportTime(): string
    {
        return $this->reportTime;
    }

    /**
     * 获取渠道服务商编号
     *
     * @return string
     */
    public function getChannelOrgId(): string
    {
        return $this->channelOrgId;
    }

    /**
     * 获取费率类型
     *
     * @return string
     */
    public function getFeeType(): string
    {
        return $this->feeType;
    }

    /**
     * 转换为数组
     *
     * @return array
     */
    public function toArray(): array
    {
        return [
            'channel_id' => $this->channelId,
            'report_status' => $this->reportStatus,
            'channel_merch_no' => $this->channelMerchNo,
            'fail_reason' => $this->failReason,
            'channel_merch_name' => $this->channelMerchName,
            'channel_merch_shortname' => $this->channelMerchShortname,
            'report_time' => $this->reportTime,
            'channel_org_id' => $this->channelOrgId,
            'fee_type' => $this->feeType,
        ];
    }
} 